package com.woniuxy.edubureau.controller;

import com.woniuxy.commons.entity.ResponseEntity;
import com.woniuxy.commons.exception.BzeducationException;
import com.woniuxy.commons.service.RemoteUploadingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


/**
 * @author: luojiwei
 * @date: 2020/7/29 12:04
 * @description: 试卷上传
 */
@RestController
@RequestMapping("/paperup")
public class PaperUpController extends BzeducationException {
    @Autowired
    private RemoteUploadingService remoteUploadingService;

    //上传试卷
    @PostMapping("/uppaper")
    public ResponseEntity<Void> upPaper(@RequestBody MultipartFile filee,@RequestParam("refreshToken") String refreshToken, @RequestParam("paperType") Integer paperType, @RequestParam("grade")String grade){
        return remoteUploadingService.uploadingTestPaper(filee,refreshToken,paperType,grade);
    }
}
